From: Chun-wei Fan Date: Wed, 20 Jun 2018 10:13:44 +0000 (+0800) Subject: gtk/: Fix build without PangoFT2 and HarfBuzz X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~34^2~25^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=eebf151f2a0277c12210c0cf73ecc1963cee847d;p=gtk%2B3.0.git gtk/: Fix build without PangoFT2 and HarfBuzz On Windows HarfBuzz and PangoFT2 are optional, so we need to ensure that we only build the bits that require HarfBuzz and PangoFT2 when needed. We may need to see later whether we can get the needed functionality in gtkfontchooserwidget.c with the Windows APIs without the need of HarfBuzz nor PangoFT2 (and starting programs on Windows using FontConfig is very slow). --- diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index b34f28fcda..b858d92c29 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -862,7 +862,9 @@ gtk_font_chooser_widget_init (GtkFontChooserWidget *fontchooser) /* Load data and set initial style-dependent parameters */ gtk_font_chooser_widget_load_fonts (fontchooser, TRUE); +#if defined(HAVE_HARFBUZZ) && defined(HAVE_PANGOFT) gtk_font_chooser_widget_populate_features (fontchooser); +#endif gtk_font_chooser_widget_set_cell_size (fontchooser); gtk_font_chooser_widget_take_font_desc (fontchooser, NULL); } diff --git a/gtk/language-names.c b/gtk/language-names.c index 6fa6eaa2f2..571dc67c0d 100644 --- a/gtk/language-names.c +++ b/gtk/language-names.c @@ -15,6 +15,8 @@ #include #include #include + +#if defined (HAVE_HARFBUZZ) && defined (HAVE_PANGOFT) #include #include "language-names.h" @@ -237,3 +239,4 @@ get_language_name_for_tag (guint32 tag) return get_language_name (pango_language_from_string (s)); } +#endif diff --git a/gtk/script-names.c b/gtk/script-names.c index 216fd40f5a..394c888aaf 100644 --- a/gtk/script-names.c +++ b/gtk/script-names.c @@ -1,6 +1,8 @@ #include "config.h" #include #include + +#if defined (HAVE_HARFBUZZ) && defined (HAVE_PANGOFT) #include #include "script-names.h" @@ -182,3 +184,4 @@ get_script_name_for_tag (guint32 tag) return NULL; } +#endif